package com.hlhj.carview.presenter

import android.content.Context
import com.example.mymvp.mvp.BasePresenter
import com.hlhj.carview.Iview.UserView
import com.hlhj.carview.bean.MyBaseBean
import com.hlhj.carview.bean.UserInfoBean
import com.hlhj.carview.module.UserModule

/**
 * Created by Never Fear   on 2018\12\18 0018.
Never More....
 */
class UserPresetner :BasePresenter<UserModule,UserView>(), UserView {

    override fun setChangeResult(myBaseBean: MyBaseBean) {
        view?.setChangeResult(myBaseBean)
    }

    fun changeHead(head:String,c: Context){
        module?.changeHead(head,c)
    }
    fun getUser(c:Context){
        module?.getUser(c)
    }
    override fun setUser(userInfoBean: UserInfoBean) {
        view?.setUser(userInfoBean)
    }

    override fun createModule() {
        module=UserModule()
        module.listener=this
    }
}